<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style>
		#box{
			width: 200px;
			height: 200px;
			background: red url() 0 0 no-repeat;
			position: absolute;
			top: 0px;
			left: 0px;
		}
	</style>
	<script>
		window.onload= function () {
			
			box = document.getElementById('box');

			box.onmousemove= function () {
				
				Bleft = Math.floor(Math.random()*800);

				Btop = Math.floor(Math.random()*400);

				box.style.top=Btop+"px";
				box.style.left=Bleft+"px";

			}
		}
	</script>
</head>
<body>
	<div id="box">
		碰不到我
	</div>
</body>
</html>